package com.kgc.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(value="com.sbt.domain.GoodsItem商品信息表",description = "对应数据库的GoodsItem表")
public class GoodsItem implements Serializable {
    private static final long serialVersionUID = 7209080603445577838L;
    @ApiModelProperty(value = "商品的id")
    private String goodsId;

    @ApiModelProperty(value = "商品的名称")
    private String goodsName;

    @ApiModelProperty(value = "商品的简介")
    private String goodsTitle;
    @ApiModelProperty(value="参考价格")
    private Integer goodsPrice;
    @ApiModelProperty(value="库存")
    private Integer goodsStock;
    @ApiModelProperty(value="分类id")
    private Integer cidParent0;
    @ApiModelProperty(value="分类id2")
    private Integer cidParent1;


    @ApiModelProperty(value = "",hidden = true)
    private Integer cid;

    @ApiModelProperty(value = "商品的品牌id")
    private Integer bid;

    @ApiModelProperty(value="1-正常 2-下架 3-无库存")
    private Integer goodsStatus;

    @ApiModelProperty(value="商品创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date goodsCreatedate;

    @ApiModelProperty(value="商家id")
    private Integer shopId;


    @ApiModelProperty(value="乐观锁",hidden = true)
    private Integer version;

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId == null ? null : goodsId.trim();
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName == null ? null : goodsName.trim();
    }

    public String getGoodsTitle() {
        return goodsTitle;
    }

    public void setGoodsTitle(String goodsTitle) {
        this.goodsTitle = goodsTitle == null ? null : goodsTitle.trim();
    }

    public Integer getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Integer goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public Integer getGoodsStock() {
        return goodsStock;
    }

    public void setGoodsStock(Integer goodsStock) {
        this.goodsStock = goodsStock;
    }

    public Integer getCidParent0() {
        return cidParent0;
    }

    public void setCidParent0(Integer cidParent0) {
        this.cidParent0 = cidParent0;
    }

    public Integer getCidParent1() {
        return cidParent1;
    }

    public void setCidParent1(Integer cidParent1) {
        this.cidParent1 = cidParent1;
    }

    public Integer getCid() {
        return cid;
    }

    public void setCid(Integer cid) {
        this.cid = cid;
    }

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    public Integer getGoodsStatus() {
        return goodsStatus;
    }

    public void setGoodsStatus(Integer goodsStatus) {
        this.goodsStatus = goodsStatus;
    }

    public Date getGoodsCreatedate() {
        return goodsCreatedate;
    }

    public void setGoodsCreatedate(Date goodsCreatedate) {
        this.goodsCreatedate = goodsCreatedate;
    }

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}